// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** 单个删除员工信息 DELETE /emps/delete/${param0} */
export async function deleteEmpByIdUsingDelete(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.deleteEmpByIdUsingDELETEParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.Robject>(`/emps/delete/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 新增员工信息 POST /emps/save */
export async function saveEmpUsingPost(body: API.EmpAddDTO, options?: { [key: string]: any }) {
  return request<API.Robject>('/emps/save', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** 单个查询员工信息 GET /emps/selectById/${param0} */
export async function selectEmpByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.selectEmpByIdUsingGETParams,
  options?: { [key: string]: any },
) {
  const { id: param0, ...queryParams } = params;
  return request<API.Robject>(`/emps/selectById/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 分页查询员工信息 GET /emps/selectPage */
export async function selectEmpPageUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.selectEmpPageUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.Robject>('/emps/selectPage', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 修改当前员工信息 PUT /emps/update */
export async function updateEmpByIdUsingPut(
  body: API.EmpEditDTO,
  options?: { [key: string]: any },
) {
  return request<API.Robject>('/emps/update', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
